package cate.game.role.farm.guildBoss.msg;

import cate.common.annotation.OperationSetter;
import cate.common.table.d.GDOperation;
import cate.game.GameBody;
import cate.game.client.ClientContext;
import cate.game.client.msg.ClientMsg;
import cate.game.client.msg.MsgConfig;
import cate.game.client.msg.MsgInput;
import cate.game.client.msg.id.MsgIdGuild;

import easy.java.dev.note.NoteField;
import easy.java.practice.errorcode.EcResult;


@ClientMsg(title = "公会BOSS关卡挑战(或扫荡) の 请求")
@OperationSetter(value = GDOperation.GUILD_BOSS_KILL)
public class GuildBossChallengeReq implements MsgInput {

    @Override
    public MsgConfig conf() {
        return MsgIdGuild.GUILD_BOSS_CHALLENGE_REQ;
    }

    @Override
    public void execute(GameBody game, ClientContext cc) {
        EcResult<?> r = cc.getRole().getFarm().guildBoss.challenge(mop);
        if (!r.ok()) {
            game.notice.message(cc.getRole(), r);
        }
    }

    @NoteField(value = "是否扫荡")
    public boolean mop = false;
}
